#!/usr/bin/env python

# @Time    : 2023/8/30 11:04
# @code_by  : zhaoxc

def calculate(num1, num2, operator):
    if operator == '+':
        return num1 + num2
    elif operator == '-':
        return num1 - num2
    elif operator == '*':
        return num1 * num2
    elif operator == '/':
        return num1 / num2

    
while True:
    num1 = float(input("请输入数字一："))
    operator = input("请输入运算符（+、-、*、/）：")
    num2 = float(input("请输入数字二："))
    value = calculate(num1, num2, operator)
    print(value)
